package com.example.jenkins;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
@RequestMapping
@SpringBootApplication
public class JenkinsApplication {

    @Value("${hello.jenkins:Default Hello Jenkins}")
    private String helloJenkins;

    public static void main(String[] args) {
        SpringApplication.run(JenkinsApplication.class, args);
        System.out.println("(♥◠‿◠)ﾉﾞ  启动成功   ლ(´ڡ`ლ)ﾞ");
    }

    @GetMapping("/hello")
    public String hello() {
        return helloJenkins;
    }

}
